package com.dsg.entity.bank;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 銀行往來明細資料
 * </p>
 *
 * @author system
 * @since 2020-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dsg_bank_detail")
@ApiModel(value = "DsgBankDetail对象", description = "銀行往來明細資料")
public class DsgBankDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主鍵")
    @TableId("OID")
    private String oid;

    @ApiModelProperty(value = "油公司")
    @TableField("OIL_COM")
    private String oilCom;

    @ApiModelProperty(value = "過數檔案主鍵")
    @TableField("RECORD_ID")
    private String recordId;

    @ApiModelProperty(value = "過數結果主鍵")
    @TableField("RESULT_ID")
    private String resultId;

    @ApiModelProperty(value = "交易帳目主鍵")
    @TableField("TRAN_ID")
    private String tranId;

    @ApiModelProperty(value = "流水編號")
    @TableField("FLOW_NO")
    private String flowNo;

    @ApiModelProperty(value = "收款帳號")
    @TableField("ACCOUNT_NO")
    private String accountNo;

    @ApiModelProperty(value = "收款銀行")
    @TableField("ACCOUNT_BANK")
    private String accountBank;

//    @ApiModelProperty(value = "收款人")
//    @TableField("ACCOUNT_NAME")
//    private String accountName;

    @ApiModelProperty(value = "付款帳號")
    @TableField("BANK_CODE")
    private String bankCode;

    @ApiModelProperty(value = "付款銀行")
    @TableField("BANK_NAME")
    private String bankName;

    @ApiModelProperty(value = "付款人")
    @TableField("PAYMENT_NAME")
    private String paymentName;

    @ApiModelProperty(value = "油咭編號")
    @TableField(exist = false)
    private String cardNo;

    @ApiModelProperty(value = "交易金額")
    @TableField("TRAN_VALUE")
    private BigDecimal tranValue;

    @ApiModelProperty(value = "交易時間")
    @TableField("TRAN_TIME")
    private Date tranTime;

    @ApiModelProperty(value = "狀態")
    @TableField("STATUS")
    private Integer status;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATER")
    private String creater;

    /**
     * 企業編號
     */
    @TableField("ENT_CODE")
    @ApiModelProperty(value = "企業編號", name = "entCode")
    private String entCode;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATER")
    private String updater;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    private Date updateTime;

    /************************查詢條件**********************/
    @ApiModelProperty(value = "上午/下午 1:上午 2:下午")
    @TableField(exist = false)
    private String dateType;

    @ApiModelProperty(value = "付款方式")
    @TableField(exist = false)
    private String payMode;

    @ApiModelProperty(value = "油公司 多間時以,號隔開")
    @TableField(exist = false)
    private String oilComs;

    @ApiModelProperty(value = "入油數據匯總表oid集合以,號分隔")
    @TableField(exist = false)
    private String pidList;

    @ApiModelProperty(value = "入油數據明細表oid集合以,號分隔")
    @TableField(exist = false)
    private String oidList;

    @ApiModelProperty(value = "开始时间")
    @TableField(exist = false)
    private String beginDate;

    @ApiModelProperty(value = "结束时间")
    @TableField(exist = false)
    private String endDate;

    @ApiModelProperty(value = "客户编号", name = "cusNo")
    @TableField(exist = false)
    private String cusNo;

    @ApiModelProperty(value = "付款賬號是否等於收款賬號 0:否 1:是", name = "flag")
    @TableField(exist = false)
    private String flag;

    @ApiModelProperty(value = "商戶編號")
    @TableField(exist = false)
    private String merchantNo;

    @ApiModelProperty(value = "有效期")
    @TableField(exist = false)
    private Date validaty;

    @ApiModelProperty(value = "交易日期")
    @TableField(exist = false)
    private String tranDateTime;

    @ApiModelProperty(value = "收款方式")
    @TableField(exist = false)
    private String payMethod;

    @ApiModelProperty(value = "過數方式")
    @TableField(exist = false)
    private String countMode;;

    @ApiModelProperty(value = "创建日期")
    @TableField(exist = false)
    private String createDate;

    @TableField(exist = false)
    private String response;

    @ApiModelProperty(value = "交易日期")
    @TableField(exist = false)
    private String tranDate;

    /************************枚舉**********************/
    public enum AppStatus {
        entered(0), generated(1), remitted(2), success(3), failure(4);
        Integer code;

        AppStatus(int code) {
            this.code = code;
        }

        public Integer getCode() {
            return code;
        }
    }
}
